<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置背景图像大小</title>
    <style type="text/css">
        div{
            width:300px;
            height:300px;
            border:3px solid #666;
            margin:0 auto;
            background-color:#FCC;
            background-image:url(images/hong.png);
            background-repeat:no-repeat;
            background-position:center center;
            background-size:100px 200px;
            }
    </style>
</head>
<body>
    <div>300px的盒子</div>
</body>
</html>

